package com.rds.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rds.common.annotation.Excel;
import com.rds.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 文档表 rda_document
 * @author rds
 */
public class Document extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long Id;

    /** 升版前文档ID */
    private Long recordId;

    /**编码*/
    @Excel(name = "编码")
    private String code;

    /**名称 */
    @Excel(name = "名称")
    private String name;

    /** 类型Id */
    @Excel(name = "类型")
    private Long typeid;

    /** 策略Id */
    @Excel(name = "策略")
    private Long policyid;

    /** 状态id */
    @Excel(name = "状态")
    private Integer stateid;

    /**类型*/
    private String systemType;

    /** 策略 */
    private String policy;

    /**状态*/
    private String state;

    /** 版本 */
    @Excel(name = "版本")
    private String revision;

    private String rds_revision;

    /**标题*/
    @Excel(name = "标题")
    private String title;


    /**电子仓库*/
    private String vault;

    /**url*/
    private String url;

    /**当前用户*/
    private String username;

    /**当前用户*/
    @Excel(name = "所有者")
    private Long ownerid;

    /**当前用户*/
    private Long companyId;

    /** 对象状态 1 是正常 0 是禁用 */
    private Long status;


    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date modifyTime;

    /**发布时间*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间")
    private Date publishTime;

    /** 文件夹id */
    private Long folderId;

    /** 关联项目id */
    private Long projectid;

    /** 关联wbsid */
    private Long pmsid;

    /** parentId */
    private Long parentid;

    /** 文件list */
    private List<File> fileList;

    private FolderRel folderRel;
    private String tmpTableType;

    private String tableName;


    /* 2021-12-14 新增文档属性**/
    /*说明**/
    private String description;
    /*更改原因**/
    private String changeReason;
    /*更改前内容**/
    private String changeBefore;
    /*更改后内容**/
    private String changeAfter;
    /*更改处数**/
    private String changeCount;
    /*更改标记**/
    private String changeMark;
    /*保密等级**/
    private String securityLevel;

    /*是否为首版本 默认是false**/
    private boolean isFirstVersion;

    /*来源系统对象Id**/
    private String objectId;
    /*来源系统名称**/
    private String source;

    /*来源系统用户名称**/
    private String sourcename;

    /*分类库路径(独立文件无此字段)**/
    private String classfication;
    /*文件夹名称(独立文件无此字段)**/
    private String folderName;

    /*文件夹与文档关系Id**/
    private String relid;

    /*关联公司名称**/
    private String companyName;

    //2022-01-24
    /*流程是否启动**/
    private String isWorkflowStart;

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getProjectid() {
        return projectid;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public void setProjectid(Long projectid) {
        this.projectid = projectid;
    }

    public Long getPmsid() {
        return pmsid;
    }

    public void setPmsid(Long pmsid) {
        this.pmsid = pmsid;
    }

    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public Long getPolicyid() {
        return policyid;
    }

    public void setPolicyid(Long policyid) {
        this.policyid = policyid;
    }

    public List<File> getFileList() {
        return fileList;
    }

    public void setFileList(List<File> fileList) {
        this.fileList = fileList;
    }

    public FolderRel getFolderRel() {
        return folderRel;
    }

    public void setFolderRel(FolderRel folderRel) {
        this.folderRel = folderRel;
    }
    public Long getFolderId() {
        return folderId;
    }

    public void setFolderId(Long folderId) {
        this.folderId = folderId;
    }

    public Long getId() {
        return Id;
    }

    public void setId(Long id) {
        Id = id;
    }

    public String getSystemType() {
        return systemType;
    }

    public void setSystemType(String systemType) {
        this.systemType = systemType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPolicy() {
        return policy;
    }

    public void setPolicy(String policy) {
        this.policy = policy;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getVault() {
        return vault;
    }

    public void setVault(String vault) {
        this.vault = vault;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Long getOwnerid() {
        return ownerid;
    }

    public void setOwnerid(Long ownerid) {
        this.ownerid = ownerid;
    }

    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getTypeid() {
        return typeid;
    }

    public void setTypeid(Long typeid) {
        this.typeid = typeid;
    }

    public Integer getStateid() {
        return stateid;
    }

    public void setStateid(Integer stateid) {
        this.stateid = stateid;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public Long getRecordId() {return recordId;}

    public void setRecordId(Long recordId) {this.recordId = recordId;}

    public String getTmpTableType() {
        return tmpTableType;
    }

    public void setTmpTableType(String tmpTableType) {
        this.tmpTableType = tmpTableType;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public Document(Long Id) {
        this.Id = Id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getChangeReason() {
        return changeReason;
    }

    public void setChangeReason(String changeReason) {
        this.changeReason = changeReason;
    }

    public String getChangeBefore() {
        return changeBefore;
    }

    public void setChangeBefore(String changeBefore) {
        this.changeBefore = changeBefore;
    }

    public String getChangeAfter() {
        return changeAfter;
    }

    public void setChangeAfter(String changeAfter) {
        this.changeAfter = changeAfter;
    }

    public String getChangeCount() {
        return changeCount;
    }

    public void setChangeCount(String changeCount) {
        this.changeCount = changeCount;
    }

    public String getChangeMark() {
        return changeMark;
    }

    public void setChangeMark(String changeMark) {
        this.changeMark = changeMark;
    }

    public String getSecurityLevel() {
        return securityLevel;
    }

    public void setSecurityLevel(String securityLevel) {
        this.securityLevel = securityLevel;
    }

    public boolean isFirstVersion() {
        return isFirstVersion;
    }

    public void setFirstVersion(boolean firstVersion) {
        isFirstVersion = firstVersion;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSourcename() {
        return sourcename;
    }

    public void setSourcename(String sourcename) {
        this.sourcename = sourcename;
    }

    public String getClassfication() {
        return classfication;
    }

    public void setClassfication(String classfication) {
        this.classfication = classfication;
    }

    public String getFolderName() {
        return folderName;
    }

    public void setFolderName(String folderName) {
        this.folderName = folderName;
    }

    public String getRelid() {
        return relid;
    }

    public void setRelid(String relid) {
        this.relid = relid;
    }

    public String getRds_revision() {
        return rds_revision;
    }

    public void setRds_revision(String rds_revision) {
        this.rds_revision = rds_revision;
    }

    public String getIsWorkflowStart() {
        return isWorkflowStart;
    }

    public void setIsWorkflowStart(String isWorkflowStart) {
        this.isWorkflowStart = isWorkflowStart;
    }

    public Document() {}

    public Document(Long typeId,String name,String revision){
        this.typeid = typeId;
        this.name = name;
        this.revision = revision;
    }

    public Document(Long recordId, String name, String code, String title, String vault, String url, String username, Long ownerid, Long companyId, Long status, Long typeid, Long policyid, Integer stateid, String revision) {
        this.recordId = recordId;
        this.name = name;
        this.code = code;
        this.title = title;
        this.vault = vault;
        this.url = url;
        this.username = username;
        this.ownerid = ownerid;
        this.companyId = companyId;
        this.status = status;
        this.typeid = typeid;
        this.policyid = policyid;
        this.stateid = stateid;
        this.revision = revision;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("Id", getId())
            .append("systemType", getSystemType())
            .append("name", getName())
            .append("code", getCode())
            .append("title", getTitle())
            .append("status", getStatus())
            .append("typeid", getTypeid())
            .append("policyid", getPolicyid())
            .append("stateid", getStateid())
            .append("revision", getRevision())
            .append("policy", getPolicy())
            .append("state", getState())
            .append("vault", getVault())
            .append("url", getUrl())
            .append("username", getUsername())
            .append("ownerid", getOwnerid())
            .append("createTime", getCreateTime())
            .append("modifyTime", getModifyTime())
            .append("publishTime", getPublishTime())
            .append("folderId", getFolderId())
            .append("companyId",getCompanyId())
            .append("recordid",getRecordId())
            .append("description",getDescription())
            .append("changeReason",getChangeReason())
            .append("changeBefore",getChangeBefore())
            .append("changeAfter",getChangeAfter())
            .append("changeCount",getChangeCount())
            .append("changeMark",getChangeMark())
            .append("securityLevel",getSecurityLevel())
            .append("isFirstVersion",isFirstVersion())
            .toString();
    }
}
